<!--通道续费-->
<template>
    <div class="common-body-wrapper">
        <multi-fun-table :fixed-cols="fixedCols" :theads-info="theadsInfo" :tbodys-info="tbodysInfo" @handleMultiCheck="handleMultiCheck" @getNextPage="getNextPage">
            <div class="operate-btn-group" slot="operateBtnGroup">
                <a class="ake_btn ake_btn_text" v-if="isPermmited('ZBCLOUD:CHANNEL:SIGN:CREATE')" @click.prevent="createInvoice()">新建订单</a>
                <a class="ake_btn ake_btn_text" v-if="isPermmited('ZBCLOUD:CHANNEL:SIGN:INVOICE')" @click.prevent="openInvoice('openInvoiceModel')">开票</a>
                <a class="ake_btn ake_btn_text" v-if="isPermmited('ZBCLOUD:CHANNEL:SIGN:INVOICE_TITLE')" @click.prevent="invoiceTitleManage()">发票抬头管理</a>
            </div> 
            
            <template slot="tdCell" slot-scope="props">
                <el-table-column :fixed="props.fixed" :label="props.label" :min-width="props.minWidth" :width="props.width" :prop="props.prop" :sortable="props.sortable">
                <template slot-scope="scope">
                    <span v-if="'renewChannel' == props.prop" @click.prevent="supportParkShowModal(scope.row)" class="row-href cursor">查看({{scope.row.parkNum}})</span>                               
                    <span v-else>{{ scope.row[props.prop] }}</span>
                </template>
                </el-table-column>
            </template>

            <!--操作列内的按钮-->
            <template slot="operateCell" slot-scope="props">
                <el-table-column :fixed="props.fixed" :label="props.label" min-width="180">
                    <template slot-scope="scope">
                        <el-button size="small" type="primary" class="ake_btn_text" v-if="isPermmited('ZBCLOUD:CHANNEL:SIGN:BANK:SAVE_BILL')" @click="syncDetail(scope.row.id,true)">同步详情</el-button>
                    </template>
                </el-table-column>
            </template>
        </multi-fun-table>

        <table-pagination :size="total" :cur-page="pageNumber" @backData="getPagination"></table-pagination>

        <!-- 开票 -->
        <basic-modal ref="openInvoiceModel" width="700" static="true">
            <h3 slot="title">开票</h3>
            <div class="modal-body" slot="modal-body">
                
            </div>
        </basic-modal>

        <!-- 发票抬头管理 -->
        <basic-modal ref="invoiceTitleManageModel" width="600" static="true" customeClass="role-row-modal">
            <h3 slot="title">发票抬头管理</h3>
            <div class="modal-body" slot="modal-body">
                <el-form :model="invoiceTitleManageData" ref="invoiceTitleManageForm" label-width="180px" label-position="left">
                    <el-form-item label="抬头类型">
                        <el-radio-group v-model="invoiceTitleManageData.titleType" @change="titleTypeChange">
                            <el-radio :label="1">个人</el-radio>
                            <el-radio :label="2">单位</el-radio>
                        </el-radio-group>
                    </el-form-item>
                    <el-form-item label="发票类型">
                        <el-radio-group v-model="invoiceTitleManageData.invoiceType">
                            <el-radio label="1">增值税专用发票</el-radio>
                            <el-radio label="2">增值税普通发票</el-radio>
                        </el-radio-group>
                    </el-form-item>
                    <el-form-item label="发票抬头">
                        <el-input></el-input>
                    </el-form-item>
                    <el-form-item label="税号">
                        <el-input placeholder="纳税人识别号或社会统一征信代码"></el-input>
                    </el-form-item>
                    <el-form-item label="企业地址">
                        <el-input type="textarea"></el-input>
                    </el-form-item>
                    <el-form-item label="企业电话">
                        <el-input></el-input>
                    </el-form-item>
                    <el-form-item label="开户银行">
                        <el-input></el-input>
                    </el-form-item>
                    <el-form-item label="银行账号">
                        <el-input></el-input>
                    </el-form-item>
                    <el-form-item label="发票邮寄地址">
                        <el-input type="textarea"  ></el-input>
                    </el-form-item>
                    <el-form-item label="收件人">
                        <el-input></el-input>
                    </el-form-item>    
                    <el-form-item label="联系电话">
                        <el-input></el-input>
                    </el-form-item>                 
                </el-form>
            </div>
        </basic-modal>
    </div>
</template>

<script>
import common from '@mixins/common.js'
import stardardList from "@mixins/tables/stardardList.js"

//modal
import invokeModal from '@mixins/modal/invokeModal.js'

//引进vue的js
import channel_sign from './js/channel_sign.js'
export default {
    mixins: [common,stardardList,invokeModal,channel_sign], 
    data() {
        return {    
            tbodysInfo: [],
            fixedCols: 1,
            total: 0,
            theadsInfo:[
                { index: 0, isShow: false, prop: 'reno', text: '续费单号', width: 110 },
                { index: 1, isShow: false, prop: 'name', text: '停车场', sortable: true, minWidth: 120 },
                { index: 2, isShow: false, prop: 'renewChannel', text: '续费通道', sortable: true, minWidth: 110 },
                { index: 3, isShow: false, prop: 'product', text: '签约产品', sortable: true, minWidth: 110 },
                { index: 4, isShow: false, prop: 'orderSubTime', text: '订单提交时间', sortable: true, minWidth: 120 },
                { index: 5, isShow: false, prop: 'orderRenewTime', text: '订单续费时间', sortable: true, minWidth: 120 },
                { index: 6, isShow: false, prop: 'money', text: '订单金额(元)', sortable: true, minWidth: 120 },
                { index: 7, isShow: false, prop: 'bankNoStatus', text: '银行水单状态', sortable: true, minWidth: 120 },
                { index: 8, isShow: false, prop: 'invoiceStatus', text: '开票状态', sortable: true, minWidth: 110 },
                { index: 9, isShow: false, prop: 'trackNo', text: '快递单号', sortable: true, minWidth: 120 },
            ]
        }
    },
    methods: {

    }
}
</script>

<style lang="less">
.role-row-modal {
  .el-textarea, .el-input{
     width: 300px;
  }
  .modal-body {
     max-height: 400px;
     overflow-y: scroll;
    }
}
</style>
